package com.bdqn.controller;

import com.bdqn.pojo.SysRole;
import com.bdqn.service.SysRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/role")
public class SysRoleController {
    @Resource
    private SysRoleService sysRoleService;
    @GetMapping("/list")
    public String list(Model model){
        List<SysRole> sysRoles = sysRoleService.list();
        model.addAttribute("roleList", sysRoles);
        return "sysRole/list";
    }

}
